<script setup></script>

<template>
  <div class="home-container">
    <el-card class="welcome-card">
      <template #header>
        <div class="card-header">
          <span>欢迎使用轻客管家系统</span>
        </div>
      </template>
      <div class="welcome-content">
        <h2>系统概览</h2>
        <p>
          轻客管家是一个综合性的客户关系管理系统，提供线索管理、商机管理、客户管理等核心功能。
        </p>
        <el-row :gutter="20" class="stats-row">
          <el-col :span="6">
            <el-card class="stat-card">
              <div class="stat-item">
                <el-icon class="stat-icon"><UserFilled /></el-icon>
                <div class="stat-info">
                  <div class="stat-number">156</div>
                  <div class="stat-label">线索总数</div>
                </div>
              </div>
            </el-card>
          </el-col>
          <el-col :span="6">
            <el-card class="stat-card">
              <div class="stat-item">
                <el-icon class="stat-icon"><Opportunity /></el-icon>
                <div class="stat-info">
                  <div class="stat-number">89</div>
                  <div class="stat-label">商机总数</div>
                </div>
              </div>
            </el-card>
          </el-col>
          <el-col :span="6">
            <el-card class="stat-card">
              <div class="stat-item">
                <el-icon class="stat-icon"><User /></el-icon>
                <div class="stat-info">
                  <div class="stat-number">234</div>
                  <div class="stat-label">客户总数</div>
                </div>
              </div>
            </el-card>
          </el-col>
          <el-col :span="6">
            <el-card class="stat-card">
              <div class="stat-item">
                <el-icon class="stat-icon"><Files /></el-icon>
                <div class="stat-info">
                  <div class="stat-number">45</div>
                  <div class="stat-label">资源总数</div>
                </div>
              </div>
            </el-card>
          </el-col>
        </el-row>
      </div>
    </el-card>
  </div>
</template>

<style scoped>
.home-container {
  padding: 20px;
}

.welcome-card {
  margin-bottom: 20px;
}

.card-header {
  font-size: 18px;
  font-weight: bold;
  color: #303133;
}

.welcome-content h2 {
  color: #409eff;
  margin-bottom: 20px;
}

.welcome-content p {
  color: #606266;
  line-height: 1.6;
  margin-bottom: 30px;
}

.stats-row {
  margin-top: 20px;
}

.stat-card {
  text-align: center;
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.stat-icon {
  font-size: 40px;
  color: #409eff;
}

.stat-info {
  text-align: left;
}

.stat-number {
  font-size: 24px;
  font-weight: bold;
  color: #303133;
}

.stat-label {
  font-size: 14px;
  color: #909399;
  margin-top: 5px;
}
</style>
